package com.castle.fortress.admin.contract.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 审查立场枚举
 * 
 * @author
 * @since 2025-04-23
 */
@Getter
@AllArgsConstructor
public enum StanceEnum {
    
    PARTY_A("partyA", "甲方立场"),
    PARTY_B("partyB", "乙方立场"),
    NEUTRAL("neutral", "中立立场");
    
    /**
     * 编码
     */
    private final String code;
    
    /**
     * 描述
     */
    private final String desc;
    
    /**
     * 根据编码获取枚举
     * 
     * @param code 编码
     * @return 枚举实例
     */
    public static StanceEnum getByCode(String code) {
        for (StanceEnum stanceEnum : StanceEnum.values()) {
            if (stanceEnum.getCode().equals(code)) {
                return stanceEnum;
            }
        }
        return null;
    }
} 